<?xml version="1.0" encoding="iso-8859-1"?>

<!-- 
  -- Please see the readme.txt file included with this distribution for 
  -- attribution and copyright information.
  -->

<root version="2.0">
	<!-- Skills -->
	<windowclass name="referenceskillcontent">
		<sheetdata>
			<stringcontrol name="typeleftbracket">
				<anchored>
					<left>
						<anchor>left</anchor>
					</left>
					<top>
						<anchor>top</anchor>
					</top>
					<size>
						<height>20</height>
						<width>5</width>
					</size>
				</anchored>
				<font>list-subtitle</font>
				<static>[</static>
			</stringcontrol>
			<stringcontrol name="ability">
				<anchored>
					<to>typeleftbracket</to>
					<position>right</position>
				</anchored>
				<font>list-subtitle</font>
				<static />
				<script>
					function onInit()
						abilitynode = window.getDatabaseNode().getChild("ability");
						trainednode = window.getDatabaseNode().getChild("trained");
						armorchecknode = window.getDatabaseNode().getChild("armorcheckpenalty");
						
						local value = abilitynode.getValue();
						
						if trainednode and trainednode.getValue() ~= 0 then
							value = value .. "; Trained only";
						end
						if armorchecknode and armorchecknode.getValue() ~= 0 then
							value = value .. "; Armor check penalty";
						end
						
						setValue(value);
					end
				</script>
			</stringcontrol>
			<stringcontrol name="typerightbracket">
				<anchored>
					<to>ability</to>
					<position>right</position>
				</anchored>
				<font>list-subtitle</font>
				<size>
					<width>10</width>
				</size>
				<static>]</static>
			</stringcontrol>

			<referenceformattedtextfield name="text">
				<anchored>
					<left>
						<anchor>left</anchor>
					</left>
					<right>
						<anchor>right</anchor>
					</right>
					<top>
						<parent>ability</parent>
						<anchor>bottom</anchor>
					</top>
				</anchored>
			</referenceformattedtextfield>
		</sheetdata>
	</windowclass>

	<windowclass name="referenceskill">
		<frame>whitecontrolarea</frame>
		<placement>
			<size>
				<width>400</width>
				<height>350</height>
			</size>
		</placement>
		<sizelimits>
			<dynamic />
		</sizelimits>
		<minimize>minimized_reference</minimize>
		<tooltip>
			<field>name</field>
		</tooltip>
		<sheetdata>
			<windowreferencecontrol>
				<bounds>20,16,20,20</bounds>
				<icon>
					<normal>button_openwindow</normal>
				</icon>
				<class>referenceskill</class>
				<description>
					<field>name</field>
				</description>
			</windowreferencecontrol>
			<stringfield name="name">
				<bounds>45,20,-25,20</bounds>
				<font>list-title</font>
				<static />
			</stringfield>

			<subwindow name="content">
				<bounds>20,40,-25,-14</bounds>
				<class>referenceskillcontent</class>
				<activate />
			</subwindow>

			<scrollercontrol>
				<anchored>
					<to>content</to>
					<position>insidebottomright</position>
				</anchored>
				<target>content</target>
				<button>
					<normal>button_scroller</normal>
					<pressed>button_scroller_down</pressed>
				</button>
			</scrollercontrol>
			
			<closebutton />
		</sheetdata>
	</windowclass>
</root>
